<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ page import= "java.util.*" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix ="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>

<%
 //创建一个当前时间
 Date date = new Date();
 //将其放入缓存中
 request.setAttribute("myDate",date);
%>
<fmt:formatDate value="${requestScope.myDate }" var="fmtDate" 
pattern="yyyy-MM-dd HH:mm:ss" scope="request" />
<c:out value="${ fmtDate}"></c:out>

<br>
数字格式化处理：
<fmt:formatNumber value="12345687.989" type="number" pattern="#,###.##" var="myNum"></fmt:formatNumber>
<c:out value="${myNum }"></c:out>
<br>
转义字符:${fn:escapeXml('<br>   jlk><<<<fjaslkdjfls')}
<c:out value="${fn:escapeXml('jlk><<<<fjaslkdjfls')}"></c:out>
</body>
</html>